﻿Imports System.Text
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports Rhino.Mocks

<TestClass()>
Public Class ReadKeyValueTests

    <TestMethod()>
    <Ignore>
    Public Sub ReadValidKeyValueLine()

        Const keyString As String = "key"
        Const valueString As String = "value"
        Const streamLine As String = keyString & "=" & valueString

        Dim mocks As MockRepository = New MockRepository()
        Dim mockStream As IO.StreamReader = mocks.StrictMock(Of IO.StreamReader)()

        Dim expexted As New KeyValueData(keyString, valueString)
        Dim actual As KeyValueData

        '-- Setup expectations ----------------------- 
        mockStream.Stub(Function(its) its.ReadLine).Return(streamLine).Repeat.Any()

        actual = Parser.ReadLineData(mockStream).KeyValueData

        Assert.AreEqual(expexted, actual)

    End Sub

End Class